import Vue from "vue"
import Vuex from 'vuex'

import count from "@/store/modules/count.js"
import condition from "@/store/modules/condition.js"
import user from "@/store/modules/user.js"
import cart from "@/store/modules/cart.js"
import addr from "@/store/modules/addr.js"

Vue.use(Vuex);//vue的插件机制

const store = new Vuex.Store({
	state:{
		// 全局属性或变量，值
		wheres:{
			bcid:1
		}
	},
	modules:{
		count,// count:count的简写
		condition,
		user,
		cart,
		addr
	},
	getters:{
		
	},
	mutations:{
		chgwh(state,whtxt){
			state.wheres = whtxt;
		}
	},
	actions:{
		
	}
})

export default store